package com.situ.day8homework6;

import org.omg.Messaging.SyncScopeHelper;

public class SubCar extends Car {
	int price;
	int speed;

	public SubCar(String mark) {
		super(mark);
	}

	public SubCar(int price, int speed) {
		super();
		this.price = price;
		this.speed = speed;
	}

	public int getPrice() {
		return price;
	}

	public void setPrice(int price) {
		this.price = price;
	}

	public int getSpeed() {
		return speed;
	}

	public void setSpeed(int speed) {
		this.speed = speed;
	}

	@Override
	public String toString() {
		return "本车的品牌是" + mark + "\n" + "奥迪车的价格是" + price + "\n" + "奥迪车的原始速度是" + speed;
	}

	@Override
	public void drive() {
		System.out.println("本车正在驾驶");
	}

	public void speedChange(int newSpeed) {
		System.out.println("奥迪车现在的速度是" + newSpeed);
	}
}
